package org.example.hadoop;

import org.example.hadoop.service.*;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.ApplicationContext;

/**
 * @author wwy
 * @date 2020-11-08 11:46
 */
@SpringBootApplication
public class HadoopApplication {
    public static void main(String[] args) {
        ApplicationContext applicationContext = SpringApplication.run(HadoopApplication.class, args);
        WordFrequencyService wordFrequencyService = applicationContext.getBean(WordFrequencyService.class);
        AuthorFrequencyService authorFrequencyService = applicationContext.getBean(AuthorFrequencyService.class);
        PublisherFrequencyService publisherFrequencyService = applicationContext.getBean(PublisherFrequencyService.class);
        PublishYearFrequencyService publishYearFrequencyService = applicationContext.getBean(PublishYearFrequencyService.class);
        AuthorRatingScoreService authorRatingScoreService = applicationContext.getBean(AuthorRatingScoreService.class);
        PriceScopeFrequencyService priceScopeFrequencyService = applicationContext.getBean(PriceScopeFrequencyService.class);
        //
        wordFrequencyService.yearBookNum();
        //作者书籍数量
        authorFrequencyService.authorBookNum();
        //出版社书籍数量
        publisherFrequencyService.publisherBookNum();
        //每年出版书籍
        publishYearFrequencyService.publishYearBookNum();
        //作者评分
        authorRatingScoreService.authorRatingScoreNumSort();
        //范围金额
        priceScopeFrequencyService.priceScope();
    }
}
